package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * IsDeletdFlageEnum 类
 *
 * @author 熊苏鹏1
 * @date 2025/2/14 16:14
 * @description 是否删除枚举
 */
@Getter
public enum IsDeletdFlageEnum {
   DELETED(1, "已删除"),
   NOT_DELETED(0, "未删除");
    public int code;
    public String message;
    IsDeletdFlageEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static ResultCodeEnum getResultCodeEnum(int code) {
        for (ResultCodeEnum resultCodeEnum : ResultCodeEnum.values()) {
            if (resultCodeEnum.getCode() == code) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}
